<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%tokens}}".
 *
 * @property string $token_id 编号，自增，主键
 * @property int $customer_id 客户编号
 * @property string $token 登录令牌
 * @property int $ctime 登录时间
 */
class Tokens extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%tokens}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['customer_id', 'ctime'], 'integer'],
            [['token'], 'string', 'max' => 200],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'token_id' => Yii::t('app', 'Token ID'),
            'customer_id' => Yii::t('app', 'Customer ID'),
            'token' => Yii::t('app', 'Token'),
            'ctime' => Yii::t('app', 'Ctime'),
        ];
    }
}
